export declare interface IHasEntityVersion {
  entityVersion?: number;
}

export declare interface IHasConcurrencyStamp {
  concurrencyStamp?: string;
}

export declare interface IMultiTenant {
  tenantId?: string;
}

export declare interface IEntityDto<TKey> {
  id: TKey;
}

export declare interface EntityDto<TKey> extends IEntityDto<TKey> { }

export declare interface IHasExtraProperties {
  extraProperties?: Record<string, string>;
}

export declare interface ISoftDelete {
  isDeleted: boolean;
}

export declare interface IHasDeletionTime extends ISoftDelete {
  deletionTime?: Date;
}

export declare interface IDeletionAuditedObject extends IHasDeletionTime {
  deleterId?: string;
}

export declare interface IHasModificationTime {
  lastModificationTime?: Date;
}

export declare interface IModificationAuditedObject extends IHasModificationTime {
  lastModifierId?: string;
}

export declare interface IMayHaveCreator {
  creatorId?: string;
}

export declare interface IHasCreationTime {
  creationTime?: Date;
}

export declare interface ICreationAuditedObject extends IHasCreationTime, IMayHaveCreator { }

export declare interface IAuditedObject
  extends ICreationAuditedObject,
  IHasCreationTime,
  IMayHaveCreator,
  IModificationAuditedObject,
  IHasModificationTime { }

export declare interface IFullAuditedObject
  extends IAuditedObject,
  ICreationAuditedObject,
  IHasCreationTime,
  IMayHaveCreator,
  IModificationAuditedObject,
  IHasModificationTime,
  IDeletionAuditedObject,
  IHasDeletionTime,
  ISoftDelete { }

export declare interface IValidatableObject {
  validate?(): void;
}

export declare interface ExtensibleObject extends IHasExtraProperties, IValidatableObject { }

export declare interface ExtensibleEntityDto<TKey> extends IHasExtraProperties, IEntityDto<TKey> { }

export declare interface ExtensibleCreationAuditedEntityDto<TPrimaryKey>
  extends ExtensibleEntityDto<TPrimaryKey>,
  ICreationAuditedObject,
  IHasCreationTime,
  IMayHaveCreator { }

export declare interface ExtensibleAuditedEntityDto<TPrimaryKey>
  extends ExtensibleCreationAuditedEntityDto<TPrimaryKey>,
  IAuditedObject,
  ICreationAuditedObject,
  IHasCreationTime,
  IMayHaveCreator,
  IModificationAuditedObject,
  IHasModificationTime { }

export declare interface ExtensibleFullAuditedEntityDto<TPrimaryKey>
  extends ExtensibleAuditedEntityDto<TPrimaryKey>,
  IFullAuditedObject,
  IAuditedObject,
  ICreationAuditedObject,
  IHasCreationTime,
  IMayHaveCreator,
  IModificationAuditedObject,
  IHasModificationTime,
  IDeletionAuditedObject,
  IHasDeletionTime,
  ISoftDelete { }

export declare interface ISortedResultRequest {
  sorting?: string;
}

export declare interface ILimitedResultRequest {
  maxResultCount: number;
}

export declare interface IPagedResultRequest extends ILimitedResultRequest {
  skipCount: number;
}

export declare interface IPagedAndSortedResultRequest
  extends IPagedResultRequest,
  ILimitedResultRequest,
  ISortedResultRequest { }

export declare interface PagedResultRequestDto extends IPagedAndSortedResultRequest { }

export declare interface PagedAndSortedResultRequestDto extends PagedResultRequestDto { }

export declare interface IHasTotalCount {
  totalCount: number;
}

export declare interface IListResult<T> {
  items: Array<T>;
}

export declare interface IPagedResult<T> extends IListResult<T>, IHasTotalCount { }

export declare interface ListResultDto<T> extends IListResult<T> { }

export declare interface PagedResultDto<T>
  extends ListResultDto<T>,
  IPagedResult<T>,
  IHasTotalCount { }

export declare interface IHasSorted {
  sort: number;
}

export declare interface IHasCode {
  code: string;
}

export declare interface IHasEnable {
  status: Enable;
}  

export enum Enable{
  Disabled = 0,
  Enabled = 1
}

export enum DataPermission {
  /// <summary>
  /// 全部数据权限
  /// </summary>
  All = 0,

  /// <summary>
  /// 本门组织
  /// </summary>
  Cur = 1,

  /// <summary>
  /// 下级组织数据权限
  /// </summary>
  Sub = 2,

  /// <summary>
  /// 本组织及下级组织数据权限
  /// </summary>
  CurAndSub = 3,

  /// <summary>
  /// 自定义
  /// </summary>
  Custom = 4
}    